<?php  if ( ! defined('BASEPATH')) exit('No direct script access allowed');
/*
| -------------------------------------------------------------------------
| URI ROUTING
| -------------------------------------------------------------------------
| This file lets you re-map URI requests to specific controller functions.
|
| Typically there is a one-to-one relationship between a URL string
| and its corresponding controller class/method. The segments in a
| URL normally follow this pattern:
|
|	example.com/class/method/id/
|
| In some instances, however, you may want to remap this relationship
| so that a different class/function is called than the one
| corresponding to the URL.
|
| Please see the user guide for complete details:
|
|	http://codeigniter.com/user_guide/general/routing.html
|
| -------------------------------------------------------------------------
| RESERVED ROUTES
| -------------------------------------------------------------------------
|
| There area two reserved routes:
|
|	$route['default_controller'] = 'welcome';
|
| This route indicates which controller class should be loaded if the
| URI contains no data. In the above example, the "welcome" class
| would be loaded.
|
|	$route['404_override'] = 'errors/page_missing';
|
| This route will tell the Router what URI segments to use if those provided
| in the URL cannot be matched to a valid route.
|
*/
$route['default_controller'] 	= 'home';
$route['404_override'] 			= 'my_404';

/*admin*/
$route['admin'] = 'admin/admin/index';
$route['admin/login'] = 'admin/admin/index';
$route['admin/logout'] = 'admin/admin/logout';
$route['admin/login/validate'] = 'admin/admin/validate';
$route['admin/([a-z-]+)/([0-9]+)$'] = 'admin/$1/index/$2';
/*frond end*/
$route['dang-ky']		= 'register/index';
$route['dang-ky/dau-bep']	= 'register/daubep';
$route['dang-ky/nha-tuyen-dung']	= 'register/nhatuyendung';
$route['dang-ky/rao-vat']	= 'register/raovat';
$route['dang-ky/thanh-cong']	= 'register/thanhcong';
$route['dang-ky/quen-mat-khau']	= 'register/resetpassword';
$route['dang-nhap']	= 'register/login';
$route['dang-xuat']	= 'register/logout';
$route['tai-khoan']	= 'account/index';
$route['dau-bep']		= 'canhan/index';
$route['dau-bep/tim-kiem']	= 'canhan/search';
$route['dau-bep/tim-kiem/([0-9]+)$']	= 'canhan/search/$1';
$route['dau-bep/([0-9]+)$']	= 'canhan/index/$1';
$route['dau-bep/([a-z-]+)-([0-9]+)$']	= 'canhan/view/$2';
$route['dau-bep/([a-z-]+)$']		=	'canhan/category/$1';
$route['pg-pb-model/([a-z-]+)/([0-9]+)$']		=	'canhan/category/$1/$2';
$route['tuyen-dung/quan-ly-tin']	= 'tuyendung/tintuyendung';
$route['tuyen-dung/quan-ly-tin/them']	= 'tuyendung/tintuyendung/them';
$route['tuyen-dung/quan-ly-tin/([a-z-]+)/([0-9]+)$']	= 'tuyendung/tintuyendung/$1/$2';
$route['tuyen-dung/ho-so-da-tra-phi']	=	'tuyendung/hoso/datraphi';
$route['tuyen-dung/ho-so-da-nop']	=	'tuyendung/hoso/danop';
$route['tuyen-dung/ho-so-ua-thich']	=	'tuyendung/hoso/uathich';
$route['rating']		= 'rating';
$route['nap-tien']		= 'cardcharge';
$route['nap-tien/nap-card']		= 'cardcharge/process';
$route['hoi-dap/([a-z0-9-]+)$']		= 'help/index/$1';
$route['([a-z-]+)$']		= 'page/index/$1';
$route['([a-z-]+)/([0-9]+)$']		= 'page/index/$1/$2';
$route['tin-tuyen-dung/([a-z-\d]+)-([0-9]+)$']		= 'tintuyendung/index/$2';
$route['tin-tuyen-dung/nop-don']		= 'tintuyendung/apply';
//$route['^([a-z-]+)([0-9]*)(p)+$']	= 'hoso/page/$2';

/* End of file routes.php */
/* Location: ./application/config/routes.php */
/*
<?php 
function remove_accent($str) 
{ 
  $a = array('À', 'Á', 'Â', 'Ã', 'Ä', 'Å', 'Æ', 'Ç', 'È', 'É', 'Ê', 'Ë', 'Ì', 'Í', 'Î', 'Ï', 'Ð', 'Ñ', 'Ò', 'Ó', 'Ô', 'Õ', 'Ö', 'Ø', 'Ù', 'Ú', 'Û', 'Ü', 'Ý', 'ß', 'à', 'á', 'â', 'ã', 'ä', 'å', 'æ', 'ç', 'è', 'é', 'ê', 'ë', 'ì', 'í', 'î', 'ï', 'ñ', 'ò', 'ó', 'ô', 'õ', 'ö', 'ø', 'ù', 'ú', 'û', 'ü', 'ý', 'ÿ', 'Ā', 'ā', 'Ă', 'ă', 'Ą', 'ą', 'Ć', 'ć', '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 'O', 'O', 'U', 'U', 'U', 'U', 'Y', 's', 'a', 'a', 'a', 'a', 'a', 'a', 'ae', 'c', 'e', 'e', 'e', 'e', 'i', 'i', 'i', 'i', 'n', 'o', 'o', 'o', 'o', 'o', 'o', 'u', 'u', 'u', 'u', 'y', 'y', 'A', 'a', 'A', 'a', 'A', 'a', 'C', 'c', 'C', 'c', 'C', 'c', 'C', 'c', 'D', 'd', 'D', 'd', 'E', 'e', 'E', 'e', 'E', 'e', 'E', 'e', 'E', 'e', 'G', 'g', 'G', 'g', 'G', 'g', 'G', 'g', 'H', 'h', 'H', 'h', 'I', 'i', 'I', 'i', 'I', 'i', 'I', 'i', 'I', 'i', 'IJ', 'ij', 'J', 'j', 'K', 'k', 'L', 'l', 'L', 'l', 'L', 'l', 'L', 'l', 'l', 'l', 'N', 'n', 'N', 'n', 'N', 'n', 'n', 'O', 'o', 'O', 'o', 'O', 'o', 'OE', 'oe', 'R', 'r', 'R', 'r', 'R', 'r', 'S', 's', 'S', 's', 'S', 's', 'S', 's', 'T', 't', 'T', 't', 'T', 't', 'U', 'u', 'U', 'u', 'U', 'u', 'U', 'u', 'U', 'u', 'U', 'u', 'W', 'w', 'Y', 'y', 'Y', 'Z', 'z', 'Z', 'z', 'Z', 'z', 's', 'f', 'O', 'o', 'U', 'u', 'A', 'a', 'I', 'i', 'O', 'o', 'U', 'u', 'U', 'u', 'U', 'u', 'U', 'u', 'U', 'u', 'A', 'a', 'AE', 'ae', 'O', 'o'); 
  return str_replace($a, $b, $str); 
} 

function post_slug($str) 
{ 
  return strtolower(preg_replace(array('/[^a-zA-Z0-9 -]/', '/[ -]+/', '/^-|-$/'), 
  array('', '-', ''), remove_accent($str))); 
} 
?> 

Example: post_slug(' -Lo#&@rem  IPSUM //dolor-/sit - amet-/-consectetur! 12 -- ') 
will output: lorem-ipsum-dolor-sit-amet-consectetur-12
*/